import request from '@/utils/request'

// 查询网站收藏列表
export function listBookmark(query) {
  return request({
    url: '/bookmark/bookmark/list',
    method: 'get',
    params: query
  })
}

// 查询网站收藏详细
export function getBookmark(id) {
  return request({
    url: '/bookmark/bookmark/' + id,
    method: 'get'
  })
}

// 新增网站收藏
export function addBookmark(data) {
  return request({
    url: '/bookmark/bookmark',
    method: 'post',
    data: data
  })
}

// 修改网站收藏
export function updateBookmark(data) {
  return request({
    url: '/bookmark/bookmark',
    method: 'put',
    data: data
  })
}

// 删除网站收藏
export function delBookmark(id) {
  return request({
    url: '/bookmark/bookmark/' + id,
    method: 'delete'
  })
}

// 搜索网站收藏
export function searchBookmark(keyword) {
  return request({
    url: '/bookmark/bookmark/search',
    method: 'get',
    params: { keyword }
  })
} 